﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="AjaxCheckboxList.aspx.cs" Inherits="Omu.AwesomeWebFormsDemo.AjaxCheckboxList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h1>AjaxRadioList</h1>
<p class="xpl">a checkbox list with all the binding posibilities (like the AjaxDrodown) </p>

 <h2>simple AjaxCheckboxList</h2>
 
 <o:AjaxCheckboxList runat="server" ID="SimpleCategories" Url="~/svc/aja.svc/CategoriesCheckboxList">
        </o:AjaxCheckboxList>      
        <h2>
            bound to one AjaxCheckboxList by parentId</h2>
        <o:AjaxCheckboxList runat="server" ID="Categories" Url="~/svc/aja.svc/CategoriesCheckboxList" Value="[2,3]">
        </o:AjaxCheckboxList> = 
        <%
            Fruits.ParentId = Categories.ClientID;
        %>
        <o:AjaxCheckboxList runat="server" ID="Fruits" Url="~/svc/aja.svc/FruitsCheckboxList"></o:AjaxCheckboxList>
        <h2>
            bound to an AjaxCheckboxList and an AjaxDropdown using Data</h2>
        <o:AjaxCheckboxList runat="server" ID="Cat1" Url="~/svc/aja.svc/CategoriesCheckboxList" Value="[1]">
        </o:AjaxCheckboxList> and 
        <o:AjaxDropdown runat="server" ID="Cat2" Url="~/svc/aja.svc/CategoriesDropdown" Value="4">
        </o:AjaxDropdown>    =
            <%
            FruitsFrom2Cat.Data = new Dictionary<string, string>
                                {
                                    {"c1",Cat1.ClientID},
                                    {"c2",Cat2.ClientID}
                                };
%>
        <o:AjaxCheckboxList runat="server" ID="FruitsFrom2Cat" Url="~/svc/aja.svc/FruitsFrom2CatCheckboxList"></o:AjaxCheckboxList>
        
     <h2>bound to Multilookup</h2>
        <o:MultiLookup runat="server" ID="CategoriesMulti" GetMultipleUrl="~/svc/aja.svc/CategoryGetMultiple"
            SearchUrl='~/svc/aja.svc/CategorySearch' SelectedUrl="~/svc/aja.svc/CategorySelected"
            Value='["1","2","3"]' OkText="Select" CancelText="Close window"
            Title="Select items and by clicking the up and down buttons" PopupWidth="900" PopupHeight="500" />
            
            <%
            FruitsFromMulti.ParentId = CategoriesMulti.ClientID;
%>
            <o:AjaxCheckboxList runat="server" ID="FruitsFromMulti" Url="~/svc/aja.svc/FruitsFromMultiListCheckboxList"></o:AjaxCheckboxList>
        <h2>bound to a simple TextBox</h2>
        write an array of numbers (1 to 5)
        <asp:TextBox runat="server" ID="txtCategory" Text="[1,3]"></asp:TextBox>
          <%
            FruitBoundToTxt.ParentId = txtCategory.ClientID;
        %>
        <o:AjaxCheckboxList runat="server" ID="FruitBoundToTxt" Url="~/svc/aja.svc/FruitsCheckboxList"></o:AjaxCheckboxList> 
               
        
        <h2>Send "Parameters" with predefined values</h2>
        <%
            FruitWithPars.Parameters = new Dictionary<string, string>{ {"parent","[1]"} };
             %>
        <o:AjaxCheckboxList runat="server" ID="FruitWithPars" Url="~/svc/aja.svc/FruitsCheckboxList"></o:AjaxCheckboxList>
        <br/>
        <br/>
        <asp:Button Text="submit" runat="server"/>
</asp:Content>